package com.le.tester.book.effectivejava3rdchinese.articlesixteen;

/**
 * createTime：2022/8/4 9:51
 * description：在公共类中使用访问方法而不是公共属性，那就是尽量的通过访问方法的形式来获取到属性
 */
public class Point {

    public double x;

    public double y;

    public Point(double x, double y) {
        this.x = x;
        this.y = y;
    }

    public double getX() {
        return x;
    }

    public void setX(double x) {
        this.x = x;
    }

    public double getY() {
        return y;
    }

    public void setY(double y) {
        this.y = y;
    }
}
